class ScrollSyncer {
    constructor() {
        this.scrollTargets = [];
    }
    register = (id, scrollFn) => {
        this.scrollTargets.push({ id, scrollFn });
    }
    scroll = (id, scrollValue) => {        
        this.scrollTargets.forEach(scrollObj => {
            typeof scrollObj.scrollFn === 'function' && scrollObj.id !== id && scrollObj.scrollFn(scrollValue);
        })
    }
}
export default ScrollSyncer;